package com.example;

import de.greenrobot.daogenerator.DaoGenerator;
import de.greenrobot.daogenerator.Entity;
import de.greenrobot.daogenerator.Schema;

public class MyClass {
    public static void main(String[] args){
        Schema schema = new Schema(1,
                "com.lanou.connotationjoke.db");
        //HomeJokeFragment 界面对应的数据表格
        Entity homeJokeEntity = schema.addEntity("HomeJokeEntity");
        //数据库表格字段名
        homeJokeEntity.addLongProperty("_id").primaryKey().autoincrement();
        homeJokeEntity.addStringProperty("avatar_url");
        homeJokeEntity.addStringProperty("name");
        homeJokeEntity.addStringProperty("content");
        homeJokeEntity.addStringProperty("category_name");
        homeJokeEntity.addStringProperty("avatar_url_comment");
        homeJokeEntity.addStringProperty("user_name_comment");
        homeJokeEntity.addIntProperty("digg_count_comment");
        homeJokeEntity.addStringProperty("text_comment");
        homeJokeEntity.addIntProperty("digg_count");
        homeJokeEntity.addIntProperty("bury_count");
        homeJokeEntity.addIntProperty("comment_count");
        homeJokeEntity.addIntProperty("share_count");
        homeJokeEntity.addStringProperty("share_url");
       //HomeVideoFragment 界面对应的数据表格
       Entity homeVideoEntity = schema.addEntity("HomeVideoEntity");
        //数据库表格字段名
        homeVideoEntity.addLongProperty("_id").primaryKey().autoincrement();
        homeVideoEntity.addStringProperty("avatar_url");
        homeVideoEntity.addStringProperty("name");
        homeVideoEntity.addStringProperty("content");
        homeVideoEntity.addStringProperty("category_name");
        homeVideoEntity.addStringProperty("cover_image_uri");
        homeVideoEntity.addStringProperty("mp4_url");
        homeVideoEntity.addStringProperty("avatar_url_comment");
        homeVideoEntity.addStringProperty("user_name_comment");
        homeVideoEntity.addIntProperty("digg_count_comment");
        homeVideoEntity.addStringProperty("text_comment");
        homeVideoEntity.addIntProperty("digg_count");
        homeVideoEntity.addIntProperty("bury_count");
        homeVideoEntity.addIntProperty("comment_count");
        homeVideoEntity.addIntProperty("share_count");
        homeVideoEntity.addStringProperty("share_url");
        homeVideoEntity.addIntProperty("play_count");



        //HomePictureFragment 界面对应的数据表格
        Entity homePictureEntity = schema.addEntity("HomePictureEntity");
        //数据库表格字段名
        homePictureEntity.addLongProperty("_id").primaryKey().autoincrement();
        homePictureEntity.addStringProperty("avatar_url");
        homePictureEntity.addStringProperty("name");
        homePictureEntity.addStringProperty("content");
        homePictureEntity.addStringProperty("category_name");
        homePictureEntity.addStringProperty("uri");
        homePictureEntity.addStringProperty("avatar_url_comment");
        homePictureEntity.addStringProperty("user_name_comment");
        homePictureEntity.addIntProperty("digg_count_comment");
        homePictureEntity.addStringProperty("text_comment");
        homePictureEntity.addIntProperty("digg_count");
        homePictureEntity.addIntProperty("bury_count");
        homePictureEntity.addIntProperty("comment_count");
        homePictureEntity.addIntProperty("share_count");
        homePictureEntity.addStringProperty("share_url");



        //HomeSubscriptionFragment 界面对应的数据表格
        Entity homeSubscriptionEntity = schema.addEntity("HomeSubscriptionEntity");
        //数据库字段名
        homeSubscriptionEntity.addLongProperty("_id").primaryKey().autoincrement();
        homeSubscriptionEntity.addStringProperty("small_icon_url");
        homeSubscriptionEntity.addStringProperty("name");
        homeSubscriptionEntity.addStringProperty("intro");
        homeSubscriptionEntity.addStringProperty("share_url");


        //HomeRecommendationFragment 界面对应的数据表格
        Entity homeRecommendationEntity = schema.addEntity("HomeRecommendationEntity");
        //数据库字段名
        homeRecommendationEntity.addLongProperty("_id").primaryKey().autoincrement();
        homeRecommendationEntity.addStringProperty("avatar_url");
        homeRecommendationEntity.addStringProperty("name");
        homeRecommendationEntity.addStringProperty("content");
        homeRecommendationEntity.addStringProperty("category_name");
        //HomePicture的图片网址
        homeRecommendationEntity.addStringProperty("uri");
        //HomeVideo的第一帧图片网址和视频网址以及播放次数
        homeRecommendationEntity.addStringProperty("cover_image_uri");
        homeRecommendationEntity.addStringProperty("mp4_url");
        homeRecommendationEntity.addIntProperty("play_count");

        homeRecommendationEntity.addIntProperty("digg_count");
        homeRecommendationEntity.addIntProperty("bury_count");
        homeRecommendationEntity.addIntProperty("comment_count");
        homeRecommendationEntity.addIntProperty("share_count");
        homeRecommendationEntity.addStringProperty("share_url");






        //HomeCollectFragment 界面对应的数据表格
        Entity homeCollectEntity = schema.addEntity("HomeCollectEntity");
        //数据库字段名
        homeCollectEntity.addLongProperty("_id").primaryKey().autoincrement();
        homeCollectEntity.addStringProperty("avatar_url");
        homeCollectEntity.addStringProperty("name");
        homeCollectEntity.addStringProperty("content");
        homeCollectEntity.addStringProperty("category_name");
        //HomePicture的图片网址
        homeCollectEntity.addStringProperty("uri");
        //HomeVideo的第一帧图片网址和视频网址以及播放次数
        homeCollectEntity.addStringProperty("cover_image_uri");
        homeCollectEntity.addStringProperty("mp4_url");
        homeCollectEntity.addIntProperty("play_count");

        homeCollectEntity.addIntProperty("digg_count");
        homeCollectEntity.addIntProperty("bury_count");
        homeCollectEntity.addIntProperty("comment_count");
        homeCollectEntity.addIntProperty("share_count");
        homeCollectEntity.addStringProperty("share_url");



        try {
            new DaoGenerator().generateAll(schema,"./app/src/main/java");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
